ImageResource.Get Function

Syntax

as P = ImageResource.Get()

Arguments

P

An image resource object.

Description

The ImageResource.Get() method creates an image resource object, which you may use to create a logical image name.

Aliasing Image Names

Aliases for image names are useful because they let you create "logical" image names and then map them to the physical image names defined in Alpha Anywhere. If you use logical image names, then you don't have to change your code if you want to change the image that it uses, you just have to change the image map.

Example

ir = ImageResource.get() 
nm = ir.GetBitmapNameMap()

There is no such image name as a5_control:browse, so this dialog box will not display correctly.

ui_dlg_box("","{image=a5_control:browse}")

Now define the logical image name a5_control:browse and map it to an existing image: $a5_browse.

nm.Initialize(<<%str% 
a5_control:browse=$a5_browse 
%str%)

Now the command works because Alpha Anywhere maps the image internally to $a5_browse.

ui_dlg_box("","{image=a5_control:browse}")

See Also